"""
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import path, re_path
from . import views
urlpatterns = [
    # 1.上传房源 图片
    re_path('api/v1.0/houses/(?P<house_id>\d+)/images/', views.UploadHouseImage.as_view()),
    # 2.首页广告推荐
    path('api/v1.0/houses/index/', views.AdvertisingRecommendation.as_view()),
    # 3.搜索
    path('api/v1.0/houses/search/',views.SearchFor.as_view()),
    # 4.新增房源信息
    path('api/v1.0/houses/', views.HouseReleaseView.as_view()),
    # 5.房源详情页面
    path('api/v1.0/houses/<int:house_id>/', views.HouseDetailsView.as_view()),

]
